KM.Geometry = function( iVertices, iNormals, iTriangles )
{
    // Vertices
    this._vertices = iVertices != undefined ? iVertices : [];
    this._verticesNb = this._vertices.length;
   
    // Normals 
    this._normals = iNormals != undefined ? iNormals : [];
    this._normalsNb = this._normals.length;
    
    // Indices
    
    // Triangles
    this._triangles = iTriangles != undefined ? iTriangles : [];
    this._trianglesNb = this._triangles.length;
};

KM.Geometry.prototype = {
    constructor: KM.Geometry,
    
    addVertex: function( iX, iY, iZ )
    {
        this._vertices.push( iX );
        this._vertices.push( iY );
        this._vertices.push( iZ );
        this._verticesNb = this._vertices.length;
    },
    
    addNormal: function( iX, iY, iZ )
    {
        this._normals.push( iX );
        this._normals.push( iY );
        this._normals.push( iZ );
        this._normalsNb = this._normals.length;
    },
    
    addTriangle: function( iA, iB, iC )
    {
        this._triangles.push( new KM.Triangle( iA, iB, iC ) );
        this._trianglesNb = this._triangles.length;
    },
    
    toString: function()
    {
        return "Geometry : \n"
            + "\t verticesNb: " + this._verticesNb
            + "\t normalsNb: " + this._normalsNb
            + "\t trianglesNb: " + this._trianglesNb;
    }
};
